<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="/Public/Style/skin.css" />
    <script type="text/javascript" src="/Public/js/jquery.js"></script>
    <script>
    $(function(){
        $(".pri_id").click(function(){
                //获取当前的level属性
                var curr_level = $(this).attr('level');
                var parent_id = $(this).attr('parent_id');
               // alert(parent_id);
                //如果当前按钮有checked属性
                if($(this).attr('checked')){            
                        $(this).prevAll(":checkbox").each(function(){
                                    //要取出当前的level属性
                                    if($(this).attr('level')<curr_level){
                                        if($(this).val()==parent_id){
                                            $(this).attr('checked','checked');
                                        }                                     
                                    }
                                    if($(this).attr('level')==0){
                                        return false;
                                    }
                        
                        });
                }else{
                    
                }
         /*   */
        });
    });
    </script>
</head>
    <body>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <!-- 头部开始 -->
            <tr>
                <td width="17" valign="top" background="/Public/Images/mail_left_bg.gif">
                    <img src="/Public/Images/left_top_right.gif" width="17" height="29" />
                </td>
                <td valign="top" background="/Public/Images/content_bg.gif">
                    <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" background="/Public/Images/content_bg.gif">
                        <tr><td height="31"><div class="title">添加字段</div></td></tr>
                    </table>
                </td>
                <td width="16" valign="top" background="/Public/Images/mail_right_bg.gif"><img src="/Public/Images/nav_right_bg.gif" width="16" height="29" /></td>
            </tr>
            <!-- 中间部分开始 -->
            <tr>
                <!--第一行左边框-->
                <td valign="middle" background="/Public/Images/mail_left_bg.gif">&nbsp;</td>
                <!--第一行中间内容-->
                <td valign="top" bgcolor="#F7F8F9">
                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <!-- 空白行-->
                        <tr><td colspan="2" valign="top">&nbsp;</td><td>&nbsp;</td><td valign="top">&nbsp;</td></tr>
                        <tr>
                            <td colspan="4">
                                <table>
                                    <tr>
                                        <td width="100" align="center"><img src="/Public/Images/mime.gif" /></td>
                                        <td valign="bottom"><h3 style="letter-spacing:1px;">在这里，您可以根据您的需求，添加模型字段！</h3></td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <!-- 一条线 -->
                        <tr>
                            <td height="40" colspan="4">
                                <table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                                    <tr><td></td></tr>
                                </table>
                            </td>
                        </tr>
                        <!-- 添加栏目开始 -->
                        <tr>
                            <td width="2%">&nbsp;</td>
                            <td width="96%">
			<table width="100%">
				<tr>
					<td colspan="2">
						<form action="/index.php/Home/Fields/add" method="post">
<table width="100%" class="cont">
	<tr>
		<td width="2%">&nbsp;</td>
		<td>字段的中文名称：</td>
		<td width="80%"><input class="text" type="text" name="f_cname" value="" /></td>                                                       
	</tr>
	<tr>
		<td width="2%">&nbsp;</td>
		<td>字段的英文名称：</td>
		<td width="80%"><input class="text" type="text" name="f_ename" value="" /></td>                                                       
	</tr>
	<tr>
		<td width="2%">&nbsp;</td>
		<td>字段的类型：</td>
		<td width="80%">
		<input type="radio" name="f_type" value="text" />单行文本<br/>
		<input type="radio" name="f_type" value="textarea" />多行文本<br/>
		<input type="radio" name="f_type" value="float" />小数<br/>
		<input type="radio" name="f_type" value="int" />整数<br/>
		<input type="radio" name="f_type" value="radio" />单选框<br/>
		<input type="radio" name="f_type" value="checkbox" />复选框<br/>
		<input type="radio" name="f_type" value="select" />下拉框<br/>                         
		</td>                                                       
	</tr>
	<tr>
		<td width="2%">&nbsp;</td>
		<td>字段的默认值：</td>
		<td width="80%">
		<textarea name="f_value" ></textarea><br/>
		多个用逗号隔开
		</td>                                                       
	</tr>
	<input type="hidden" name="model_id" value="<?php echo $_GET['id']?>"/>
	<tr>
		<td>&nbsp;</td>
		<td colspan="3"><input class="btn" type="submit" value="提交" /></td>
		<td>&nbsp;</td>
	</tr>
</table>
						</form>
					</td>
				</tr>
			</table>
		</td>
		<td width="2%">&nbsp;</td>
	</tr>
	<!-- 添加栏目结束 -->
	<tr>
		<td height="40" colspan="4">
			<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
				<tr><td></td></tr>
			</table>
		</td>
	</tr>
	<tr>
		<td width="2%">&nbsp;</td>
		<td width="51%" class="left_txt">
			<img src="/Public/Images/icon_mail.gif" width="16" height="11"> 客户服务邮箱：rainman@foxmail.com<br />
			<img src="/Public/Images/icon_phone.gif" width="17" height="14"> 官方网站：<a href="http://www.rain-man.cn">http://www.rain-man.cn</a>
		</td>
		<td>&nbsp;</td><td>&nbsp;</td>
	</tr>
</table>
                </td>
                <td background="/Public/Images/mail_right_bg.gif">&nbsp;</td>
            </tr>
            <!-- 底部部分 -->
            <tr>
                <td valign="bottom" background="/Public/Images/mail_left_bg.gif">
                    <img src="/Public/Images/buttom_left.gif" width="17" height="17" />
                </td>
                <td background="/Public/Images/buttom_bgs.gif">
                    <img src="/Public/Images/buttom_bgs.gif" width="17" height="17">
                </td>
                <td valign="bottom" background="/Public/Images/mail_right_bg.gif">
                    <img src="/Public/Images/buttom_right.gif" width="16" height="17" />
                </td>           
            </tr>
        </table>
    </body>
</html>